//
//  ContinentTableViewCell.m
//  PTravel
//
//  Created by dllo on 15/11/17.
//  Copyright © 2015年 李涵. All rights reserved.
//

#import "ContinentTableViewCell.h"

@implementation ContinentTableViewCell

- (void)dealloc
{
    [_label release];
    [_continent release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}

- (void)createSubViews
{
    self.label = [[UILabel alloc] initWithFrame:CGRectMake(2, 20, BOUNDS.size.width/5.0, BOUNDS.size.height/14)];
    self.label.backgroundColor = [UIColor clearColor];
    self.label.font = [UIFont systemFontOfSize:18];
    self.label.layer.masksToBounds = YES;
    self.label.layer.cornerRadius = 20;
    self.label.textAlignment = 1;
    [self.contentView addSubview:self.label];
    [_label release];
}



- (void)setContinent:(Continent *)continent
{
    if (_continent != continent) {
        [_continent release];
        _continent = [continent retain];
    }
    self.label.text = continent.cnname;
    self.label.textColor = TEXTCOLOR;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
